using UnityEngine;
using UnityEngine.UI;

public class UIRealTimeRankingElement : MonoBehaviour
{
	public RectTransform contentTransform;

	public Text scoreText;

	public Image backgroundImage;

	public void SetOffset(float offsetPercent)
	{
		contentTransform.anchoredPosition = new Vector3(Mathf.Lerp(-30f, -60f, offsetPercent), 0f, 0f);
	}

	public void SetColor(Color textColor, Color bgColor)
	{
		scoreText.color = textColor;
		backgroundImage.color = bgColor;
	}

	public void SetText(string str)
	{
		scoreText.text = str;
	}
}
